-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create op-simulator as basic proxy #33
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @tremarkley and the rest of your teammates on Graphite |
efda568
to
06f4cd4
Compare
762d86b
to
5c0d8af
Compare
5c0d8af
to
39f92ae
Compare
} | ||
|
||
type Supersim struct { | ||
log log.Logger | ||
|
||
l1Chain *anvil.Anvil | ||
l2Chains map[uint64]*anvil.Anvil | ||
l1Anvil *anvil.Anvil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
In order to simplify the changes in this file, I wonder if we should simply have OpSimulator manage the lifecycle of the the underlying chain, in this case anvil. So that we dont need reference to each individual pieces here
Not worth addressing in the PR. Just some food for thought for ways to clean up this code in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I wont address in this PR, since I want to keep this change small.
If we want to stick to the original design, we should create an Orchestrator
service that handles spinning up all the anvil instances and OpSimulator
instances.
39f92ae
to
7247db8
Compare
7247db8
to
f2cc9a8
Compare
Closes #16
This PR makes the following changes:
op_simulator
packageop_simulator
for each chain as a ReverseProxy that intercepts all rpc requests and forwards them to the underlying anvil node for that chainop_simulator
andanvil
instances using thesupersim
package